﻿using System.Collections;

namespace Quail
{
    /// <summary>
    /// Interface used for WebControl instances that have row data
    /// </summary>
    public interface IWebControlWithRows
    {
        /// <summary>
        /// Gets the row count.
        /// </summary>
        /// <value>The row count.</value>
        int RowCount { get; }

        /// <summary>
        /// Gets the control's selector
        /// </summary>
        string Selector { get; }

        /// <summary>
        /// Gets a selector that can access all the elements for the row
        /// </summary>
        /// <param name="row">The row index</param>
        /// <returns>A jQuery selector access the row</returns>
        string GetRowSelector(int row);

        /// <summary>
        /// Gets a selector that can access an element within a column
        /// </summary>
        /// <param name="column">The column index</param>
        /// <returns>A jQuery selector to access the column</returns>
        string GetColumnSelector(int column);

        /// <summary>
        /// Gets a hashtable for the controls
        /// </summary>
        Hashtable ControlHashtable { get; }
    }
}
